package com.yzy.soft.common.persistence.model;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.enums.FieldFill;
import com.baomidou.mybatisplus.enums.IdType;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * <p>
 * </p>
 *
 * @author yinzhiyuan
 * @since 2018-01-03
 */
public class Business extends Model<Business> {

    private static final long serialVersionUID = 1L;
    @TableId(value = "id", type = IdType.UUID)
    @TableField(fill= FieldFill.INSERT_UPDATE)
    private String id;
    private String number;
    private String name;
    private String type;
    private String state;
    private String subtype;
    private String object;
    private String index;
    private String remark;
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(fill= FieldFill.INSERT)
    private Date create;
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(fill= FieldFill.INSERT_UPDATE)
    private Date update;
    @TableField("versionId")
    private String versionId;
    @TableField(value = "userflag")
    private int userflag;
    @TableField(value = "deleteflag")
    @TableLogic
    private int deleteflag;
    private int businesstreeid;
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getNumber() {
        return number;
    }

    public void setNumber(String number) {
        this.number = number;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getSubtype() {
        return subtype;
    }

    public void setSubtype(String subtype) {
        this.subtype = subtype;
    }

    public String getObject() {
        return object;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    public void setObject(String object) {
        this.object = object;
    }

    public String getIndex() {
        return index;
    }

    public void setIndex(String index) {
        this.index = index;
    }

    public Date getCreate() {
        return create;
    }

    public void setCreate(Date create) {
        this.create = create;
    }

    public Date getUpdate() {
        return update;
    }

    public void setUpdate(Date update) {
        this.update = update;
    }

    public String getVersionId() {
        return versionId;
    }

    public void setVersionId(String versionId) {
        this.versionId = versionId;
    }

    public int getUserflag() {
        return userflag;
    }

    public void setUserflag(int userflag) {
        this.userflag = userflag;
    }

    public int getDeleteflag() {
        return deleteflag;
    }

    public void setDeleteflag(int deleteflag) {
        this.deleteflag = deleteflag;
    }
    public int getBusinesstreeid() {
        return businesstreeid;
    }

    public void setBusinesstreeid(int businesstreeid) {
        this.businesstreeid = businesstreeid;
    }
    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Business{" +
                "id='" + id + '\'' +
                ", number='" + number + '\'' +
                ", name='" + name + '\'' +
                ", type='" + type + '\'' +
                ", subtype='" + subtype + '\'' +
                ", object='" + object + '\'' +
                ", index='" + index + '\'' +
                ", remark='" + remark + '\'' +
                ", create=" + create +
                ", update=" + update +
                ", versionId='" + versionId + '\'' +
                '}';
    }
}
